class my_open_shell(Command):
    """:my_open_shell

    Open shell in current file diretory, if ranger is in tmux, this shell will
    open a new tmux window in current directory.
    """

    # The execute method is called when you run this command in ranger.
    def execute(self):
        if 'TMUX' in os.environ.keys():
            self.fm.execute_console("shell tmux new-window -c " + self.fm.thisfile.dirname)
        else:
            self.fm.execute_console("shell $SHELL")
